conf: remove some unfixable TODOs
authorFelix Krull <f_krull@gmx.de>
Tue, 25 Aug 2020 23:03:41 +0000 (01:03 +0200)
committerColin Walters <walters@verbum.org>
Fri, 6 May 2022 16:53:56 +0000 (12:53 -0400)
rust-bindings/rust/conf/ostree.toml
rust-bindings/rust/src/auto/functions.rs
rust-bindings/rust/src/auto/se_policy.rs
rust-bindings/rust/src/auto/versions.txt
rust-bindings/rust/src/checksum.rs
rust-bindings/rust/sys/src/auto/versions.txt

index ae0a5710b534400ab08424b7ae2fb95f3b936dc1..0458b8cfe55a7f5324bb06a5c3bf205ad4edb70f 100644 (file)
@@ -48,7 +48,6 @@ generate = [
     "OSTree.RepoPullFlags",
     "OSTree.RepoRemoteChange",
     "OSTree.RepoResolveRevExtFlags",
-    "OSTree.SePolicy",
     "OSTree.SePolicyRestoreconFlags",
     "OSTree.StaticDeltaGenerateOpt",
     "OSTree.Sysroot",
@@ -185,6 +184,14 @@ status = "generate"
 init_function_expression = "|_ptr| ()"
 clear_function_expression = "|_ptr| ()"
 
+[[object]]
+name = "OSTree.SePolicy"
+status = "generate"
+    [[object.function]]
+    # has an unused raw pointer parameter so we wrap it by hand
+    name = "fscreatecon_cleanup"
+    ignore = true
+
 [[object]]
 name = "OSTree.Sign"
 status = "generate"
@@ -197,7 +204,7 @@ name = "OSTree.*"
 status = "generate"
     [[object.function]]
     # low-level functions with unsafe APIs
-    pattern = "cmp_checksum_bytes|checksum_inplace_to_bytes|hash_object_name"
+    pattern = "cmp_checksum_bytes|checksum_inplace_from_bytes|checksum_inplace_to_bytes|checksum_b64_inplace_from_bytes|checksum_b64_inplace_to_bytes|hash_object_name"
     ignore = true
 
     [[object.function]]
index 8749b57beeefad139f97b76a11507a6918fddd2c..e0603115db4bd0de45f78a830ca830ce455084b1 100644 (file)
@@ -38,14 +38,6 @@ pub fn check_version(required_year: u32, required_release: u32) -> bool {
 //    unsafe { TODO: call ostree_sys:ostree_checksum_b64_from_bytes() }
 //}
 
-//pub fn checksum_b64_inplace_from_bytes(csum: /*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32, buf: &str) {
-//    unsafe { TODO: call ostree_sys:ostree_checksum_b64_inplace_from_bytes() }
-//}
-
-//pub fn checksum_b64_inplace_to_bytes(checksum: /*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 28 }; 32, buf: u8) {
-//    unsafe { TODO: call ostree_sys:ostree_checksum_b64_inplace_to_bytes() }
-//}
-
 //#[cfg(any(feature = "v2016_8", feature = "dox"))]
 //pub fn checksum_b64_to_bytes(checksum: &str) -> /*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32 {
 //    unsafe { TODO: call ostree_sys:ostree_checksum_b64_to_bytes() }
@@ -86,10 +78,6 @@ pub fn checksum_from_bytes_v(csum_v: &glib::Variant) -> Option<GString> {
     }
 }
 
-//pub fn checksum_inplace_from_bytes(csum: /*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32, buf: &str) {
-//    unsafe { TODO: call ostree_sys:ostree_checksum_inplace_from_bytes() }
-//}
-
 //pub fn checksum_to_bytes(checksum: &str) -> /*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32 {
 //    unsafe { TODO: call ostree_sys:ostree_checksum_to_bytes() }
 //}
index 57f3014dbc358f2a6d61a0a9366560a16ea969dd..b81cea8adc4190b65f6e8ca9e42b847cb6dbbf97 100644 (file)
@@ -94,10 +94,6 @@ impl SePolicy {
             value.get().expect("Return Value for property `rootfs-dfd` getter").unwrap()
         }
     }
-
-    //pub fn fscreatecon_cleanup(unused: /*Unimplemented*/Option<Fundamental: Pointer>) {
-    //    unsafe { TODO: call ostree_sys:ostree_sepolicy_fscreatecon_cleanup() }
-    //}
 }
 
 impl fmt::Display for SePolicy {
index 557e5d3e0ae7acc07b061fe52ad9ace405a127bb..7b36b436c7aa41302a08e773c67d9f113e6cc77e 100644 (file)
@@ -1,2 +1,2 @@
 Generated by gir (https://github.com/gtk-rs/gir @ 2d1ffab1)
-from gir-files (https://github.com/gtk-rs/gir-files @ ff904f0)
+from gir-files (https://github.com/gtk-rs/gir-files @ 203ae47)
index 1058f718204ba7a97d4407734a588a03d9f0fb54..82c87df4ce94d26a0a78722574eed3d079a419d3 100644 (file)
@@ -45,7 +45,6 @@ impl Checksum {
     /// Unfortunately, the underlying libostree function has no way to report parsing errors. If the
     /// string is not a valid SHA256 string, the program will abort!
     pub fn from_hex(checksum: &str) -> Checksum {
-        // TODO: implement by hand to avoid stupid assertions?
         assert_eq!(checksum.len(), HEX_LEN);
         unsafe {
             // We know checksum is at least as long as needed, trailing NUL is unnecessary.
@@ -60,7 +59,6 @@ impl Checksum {
     /// Invalid base64 characters will not be reported, but will cause unknown output instead, most
     /// likely 0.
     pub fn from_base64(b64_checksum: &str) -> Checksum {
-        // TODO: implement by hand for better error reporting?
         assert_eq!(b64_checksum.len(), B64_LEN);
         unsafe {
             let buf = g_malloc0(BYTES_LEN) as *mut [u8; BYTES_LEN];
index 557e5d3e0ae7acc07b061fe52ad9ace405a127bb..7b36b436c7aa41302a08e773c67d9f113e6cc77e 100644 (file)
@@ -1,2 +1,2 @@
 Generated by gir (https://github.com/gtk-rs/gir @ 2d1ffab1)
-from gir-files (https://github.com/gtk-rs/gir-files @ ff904f0)
+from gir-files (https://github.com/gtk-rs/gir-files @ 203ae47)